import {
    Model,
    Table,
    PrimaryKey,
    AutoIncrement,
    Column,
    Sequelize,
    ForeignKey
} from "sequelize-typescript";
import AdminModel from './admin.model'

@Table({
    modelName: "organization"
})
export default class Organization extends Model<Organization> {
    @PrimaryKey
    @AutoIncrement
    @Column(Sequelize.INTEGER(64))
    organizationId: number;

    @Column(Sequelize.STRING)
    organizationName: string;

    @Column(Sequelize.STRING)
    organizationItem: string;

    @Column(Sequelize.STRING)
    organizationPage: string;

    @ForeignKey(() => AdminModel)
    @Column(Sequelize.INTEGER(64))
    createBy: number;
}